#global-bar.clearfix
	div.clearfix.wrapper
		#logo
			if site == 'mootools'
				h1
					a(href='/')
						img(src='/images/logo/mootools-payoff.png', alt='MooTools')

				p.visually-hidden
					| Your resources for every-day JavaScripting
			else
				p
					a(href='/')
						img(src='/images/logo/mootools.png', alt='MooTools Home')

		#main-header.right.clearfix

			mixin menu-item(link, text, selected, reallySelected)
				if reallySelected == undefined
					reallySelected = selected

				mixin link
					a(href=link) #{text}
				if selected
					if reallySelected
						li.selected: mixin link
					else
						li.selected.not-really: mixin link
				else
					li: mixin link

			ul
				li(class=(site == 'core' ? 'selected' : ''))
					a(href='/core/') Core

				li(class=(site == 'more' ? 'selected' : ''))
					a(href='/more/')  More

				mixin menu-item('/blog', 'Blog', site == 'blog')
				mixin menu-item('/forge', 'Forge', site == 'forge')
				mixin menu-item("http://github.com/mootools", 'Contribute')

			form#search(role='search', method='get', action='/search')
				label(for='search-field')
					span.icon.search(aria-hidden='true')
					input#search-field(name='q', type='search', placeholder='Search in the site')
